import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    
    {
      path: '/',
      name: 'CIM',
      component: () => import('../views/CIM.vue'),
    },
    {
      path: '/community',
      name: 'Community',
      component: () => import('../views/Community.vue'),
    },
    {
      path: '/energy',
      name: 'Energy',
      component: () => import('../views/Energy.vue'),
    },
    {
      path: '/energyconservation',
      name: 'EnergyConservation',
      component: () => import('../views/EnergyConservation.vue'),
    },
    {
      path: '/security',
      name: 'Security',
      component: () => import('../views/Security.vue'),
    },
    {
      path: '/test',
      name: 'Test',
      component: () => import('../views/TestA.vue'),
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue')
    // }
  ]
})
// router.beforeEach((to, from, next) => {
//   setTimeout(() => {
//   next()
//   },1000)
// })
export default router
